package com.wander.patterns.create.singleton;

/**
 * @description:静态内部类实现单例
 * @author: zhuyong
 * @create: 2019-09-04 16:30
 **/
public class StaticInnerClassSingleton {
    private static  class Singleton{
        private static StaticInnerClassSingleton singleton = new StaticInnerClassSingleton();
    }

    private StaticInnerClassSingleton(){}

    public static StaticInnerClassSingleton getInstance(){
        return Singleton.singleton;
    }
}
